package com.lgc.consumer01.controller;

import com.lgc.consumer01.service.FeignService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @param
 * @author lvguangchun
 * @create 2022-08-24 9:21
 */
@RestController
public class ConsumerController {
    @Resource
    private FeignService feignService;

    @RequestMapping("/info")
    public String getInfo(){
        return feignService.getInfo();
    }

    //这是用于测试Feign进行nacos服务调用的接口
    @RequestMapping("/staff")
    public List getStaff(){
        return feignService.getStaff();
    }
}
